<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="/templates/default.xhtml">
            <ui:define name="content">
                <h:form>
                        <h:panelGrid id="panelNewDep" columns="2" >
                            <f:facet name="header">
                                <h:outputText value="#{locale.formDepartmentInfo}"/>
                             </f:facet>
                            <h:outputLabel value="#{locale.formName}:" />
                            <h:inputText value="#{newDepartment.newDepartment.name}" size="20"  />
                            <h:outputLabel value="#{locale.formAddress}:" />
                            <h:inputText value="#{newDepartment.newDepartment.address}" size="20"  />
                            <h:outputLabel value="#{locale.formPhone}:" />
                            <h:inputText value="#{newDepartment.newDepartment.phoneNr}" size="20"  />
                            <h:outputLabel value="#{locale.formInstitute}:" />
                            <h:selectOneMenu value="#{newDepartment.newDepartment.institute.instituteID}">
                                <f:selectItem itemLabel="#{locale.selectInstitute}" itemValue=""/>
                                <f:selectItems value="#{newDepartment.institutes}" var="inst" itemLabel="#{inst.name}" itemValue="#{inst.instituteID}"/>
                            </h:selectOneMenu>
                            <h:outputLabel value="#{locale.formNote}:" />
                            <h:inputText value="#{newDepartment.newDepartment.note}" size="20"  />
                        </h:panelGrid>

                    <h:commandButton value="#{locale.buttonAdd}" action="#{newDepartment.executeNewDepartment}" />
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

